package com.InterestingExercises.电影信息系统Object_Oriented;

/**
 * 电影实体类
 */
public class Film {
    private int id;//ID
    private String name;//名称
    private double price;//票价
    private double score;//评分
    private String director;//导演
    private String actor;//主演
    private String info;//其他信息

    //无参构造函数
    public Film() {
    }

    //有参构造函数
    public Film(int id, String name, double price, double score, String director, String actor, String info) {
        this.id = id;
        this.name = name;
        this.price = price;
        this.score = score;
        this.director = director;
        this.actor = actor;
        this.info = info;
    }

    //Getter & Setter
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public double getScore() {
        return score;
    }

    public void setScore(double score) {
        this.score = score;
    }

    public String getDirector() {
        return director;
    }

    public void setDirector(String director) {
        this.director = director;
    }

    public String getActor() {
        return actor;
    }

    public void setActor(String actor) {
        this.actor = actor;
    }

    public String getInfo() {
        return info;
    }

    public void setInfo(String info) {
        this.info = info;
    }

    /**
     * 重写toString函数
     *
     * @return
     */
    @Override
    public String toString() {
        return "Film{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", price=" + price +
                ", score=" + score +
                ", director='" + director + '\'' +
                ", actor='" + actor + '\'' +
                ", info='" + info + '\'' +
                '}';
    }
}
